package com.example.demo.controller;

import com.example.demo.Service.GetRecipeListService;
import com.example.demo.beans.GetRecipeListRequest1;
import com.example.demo.beans.GetRecipeListResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2018-05-08.
 */
@RestController
public class GetRecipeListController {
    @Autowired
    @Qualifier("GetRecipeListService")
    private GetRecipeListService service ;
    @ResponseBody
    @RequestMapping(value = "GetRecipeList",produces = "application/xml")
    public GetRecipeListResponse getRecipeList(@RequestBody(required = false) GetRecipeListRequest1 request)
    {if(request!=null){
        return  service.getRecipeResponse(request);
    }
    return null;

    }
}
